/**
 * Title: OperatingLogController.java
 * @author WuJin
 * @date 2020年6月16日
 * @version 1.0
 */
package com.pm.controller.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.PageInfo;
import com.pm.common.Pages;
import com.pm.common.Response;
import com.pm.common.annotation.MyLog;
import com.pm.common.annotation.UserLoginToken;
import com.pm.common.exception.ExpCodeState;
import com.pm.entity.po.security.OperatingLog;
import com.pm.service.security.OperatingLogService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * Title: OperatingLogController
 * 
 * @author WuJin
 * @date 2020年6月16日
 */
@UserLoginToken
@Api(tags = "日志管理")
@RestController
@RequestMapping("/log")
public class OperatingLogController {
	@Autowired
	private OperatingLogService operatingLogService;

	@ApiOperation("分页查询接口")
	@PostMapping("/getListByPage/{pageNum}/{pageSize}")
	@ResponseBody
	@MyLog(value = "查询日志列表信息")
	public Response<PageInfo<OperatingLog>> getList(OperatingLog operatingLog, Pages page) {
		PageInfo<OperatingLog> result = operatingLogService.getListByPage(operatingLog, page);
		Response<PageInfo<OperatingLog>> res = new Response<PageInfo<OperatingLog>>(ExpCodeState.query_data_success,
				result);
		return res;
	}
}
